package cn.liulin.java8.selfFunc;

import java.util.LinkedList;
import java.util.List;

/**
 * cn.liulin.java8.selfFunc$
 *
 * @author ll
 * @date 2023-02-15 17:11:04
 **/
public class CalcuFunc {
    public CalcuFunc next;
    public CalcuFunc before;
    public List<String> list = new LinkedList<>();

    public boolean check() {
        String s0 = list.get(0);
        String op = list.get(1);
        String s2 = list.get(2);
        if ("OR".equalsIgnoreCase(op)) {
            return Boolean.parseBoolean(s0) || Boolean.parseBoolean(s2);
        }
        return Boolean.parseBoolean(s0) && Boolean.parseBoolean(s2);
    }
}
